package com.rong.shop.mapper;

import com.rong.shop.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

@Mapper
public interface UserMapper {

    Integer addUser(User user);

    User findByUsername(String username);

    User findByUid(Integer uid);

    Integer updatePwdByUid(@Param("uid") Integer uid,
                            @Param("password") String password,
                            @Param("modifiedUser") String modifiedUser,
                            @Param("modifiedTime") Date modifiedTime);

    Integer updateAvatarByUid(@Param("uid") Integer uid,
                              @Param("avatar") String avatar,
                              @Param("modifiedUser") String modifiedUser,
                              @Param("modifiedTime") Date modifiedTime);

    Integer updateInfoByUid(User user);


}
